﻿<%@ Page Title="Registrar Descuento" Language="C#" MasterPageFile="~/MasterPage/Master.Master"
    AutoEventWireup="true" CodeBehind="wFrmDescuentosActualizar.aspx.cs" Inherits="Crosland.Automotriz.Web.Repuestos.wFrmDescuentosActualizar" %>

<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxRoundPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxClasses" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxUploadControl" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxTabControl" TagPrefix="dx1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">
    <script type="text/javascript">
        function MostrarAlerta() {
            popupErrores.Show();
        }
        function CargaExcel() {
            pcImpExcel.Show();
        }

        function MostrarDatos() {
            btnVerDetalle.DoClick();
        }

        function RegistrarTriggers(control) {
            Sys.WebForm.PageRequestManager.getInstance()._updateControls(['UpdatePanel1'], [], [control.id], 90);
        }
        function Nuevo() {
            document.getElementById("txtCodMaterial").value = "";
            document.getElementById("lblDesMaterial").innerHTML = "";
            document.getElementById("lblModelo").innerHTML = "";
            document.getElementById("lblGrupoArticulo").innerHTML = "";
            document.getElementById("lblSector").innerHTML = "";
            document.getElementById("lblStock").innerHTML = "";
            document.getElementById("txtTipo").value = "N";
            popupNuevo.Show();
            document.getElementById("txtCodMaterial").focus();
        }
        function Salir() {
            popupNuevo.Hide();
        }
    </script>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div style="padding: 10px">
                <div class="main-header" style="width: 100%;">
                    <div class="main-titulo" style="text-align: left">
                        Registrar Oferta</div>
                </div>
                <table width="100%">
                    <tr>
                        <td class="filas2"  style="width: 105px">
                            <dx:ASPxButton ID="btnRegistrar" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                Text="Grabar" Width="100px" OnClick="btnRegistrar_Click">
                                <Image Url="~/Images/save_16.gif">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                        <td class="filas2"  width="175">
                            <dx:ASPxButton ID="btnDescargarExcel" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                Text="Descargar Formato" Width="170px" AutoPostBack="False">
                                <ClientSideEvents Click="function(s, e) {
	MostrarDatos();
}" />
                                <Image Url="~/Images/excel16.gif">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                        <td class="filas2" >
                            <dx:ASPxButton ID="btnSalir" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                Text="Salir" Width="100px" OnClick="btnSalir_Click">
                                <Image Url="~/Images/logout.png">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="3">
                            <hr />
                        </td>
                    </tr>
                </table>
                <dx:ASPxPageControl ID="ASPxPageControl1" runat="server" ActiveTabIndex="0" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                    TabSpacing="0px" Width="100%">
                    <TabPages>
                        <dx:TabPage Text="Datos Generales">
                            <TabImage Url="~/Images/landscape.gif">
                            </TabImage>
                            <ContentCollection>
                                <dx:ContentControl runat="server" SupportsDisabledAttribute="True">
                                    <dx:ASPxRoundPanel ID="ASPxRoundPanel1" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" EnableDefaultAppearance="False" GroupBoxCaptionOffsetX="6px"
                                        GroupBoxCaptionOffsetY="-19px" HeaderText="Datos Generales" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Width="100%">
                                        <ContentPaddings PaddingBottom="10px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="10px" />
                                        <HeaderStyle>
                                            <Paddings PaddingBottom="6px" PaddingLeft="9px" PaddingRight="11px" PaddingTop="3px" />
                                        </HeaderStyle>
                                        <PanelCollection>
                                            <dx:PanelContent runat="server" SupportsDisabledAttribute="True">
                                                <table width="100%" cellpadding="4" cellspacing="0">
                                                    <tr>
                                                        <td style="width: 98px">
                                                            <asp:Label ID="Label1" runat="server" Text="Organización:"></asp:Label>
                                                        </td>
                                                        <td style="width: 155px">
                                                            <dx:ASPxComboBox ID="cboOrganizacion" runat="server" AutoPostBack="True" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                                CssPostfix="Office2010Blue" Height="30px" OnSelectedIndexChanged="cboOrganizacion_SelectedIndexChanged"
                                                                Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="150px">
                                                                <ItemStyle Height="30px" />
                                                                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                                </LoadingPanelImage>
                                                                <LoadingPanelStyle ImageSpacing="5px">
                                                                </LoadingPanelStyle>
                                                                <DropDownButton Width="20px">
                                                                </DropDownButton>
                                                                <ButtonStyle Width="13px">
                                                                </ButtonStyle>
                                                                <Paddings PaddingLeft="5px" />
                                                            </dx:ASPxComboBox>
                                                        </td>
                                                        <td style="width: 100px">
                                                            <asp:Label ID="Label2" runat="server" Text="Oficina:"></asp:Label>
                                                        </td>
                                                        <td style="width: 155px">
                                                            <dx:ASPxComboBox ID="cboOficina" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                                CssPostfix="Office2010Blue" Height="30px" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                                Width="150px">
                                                                <ItemStyle Height="30px" />
                                                                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                                </LoadingPanelImage>
                                                                <LoadingPanelStyle ImageSpacing="5px">
                                                                </LoadingPanelStyle>
                                                                <DropDownButton Width="20px">
                                                                </DropDownButton>
                                                                <ButtonStyle Width="13px">
                                                                </ButtonStyle>
                                                                <Paddings PaddingLeft="5px" />
                                                            </dx:ASPxComboBox>
                                                        </td>
                                                        <td style="width: 84px">
                                                            <asp:Label ID="Label3" runat="server" Text="Canal:"></asp:Label>
                                                        </td>
                                                        <td style="width: 155px">
                                                            <dx:ASPxComboBox ID="cboCanal" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                                CssPostfix="Office2010Blue" Height="30px" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                                Width="150px">
                                                                <ItemStyle Height="30px" />
                                                                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                                </LoadingPanelImage>
                                                                <LoadingPanelStyle ImageSpacing="5px">
                                                                </LoadingPanelStyle>
                                                                <DropDownButton Width="20px">
                                                                </DropDownButton>
                                                                <ButtonStyle Width="13px">
                                                                </ButtonStyle>
                                                                <Paddings PaddingLeft="5px" />
                                                            </dx:ASPxComboBox>
                                                        </td>
                                                        <td>
                                                            &nbsp;
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="width: 98px">
                                                            <asp:Label ID="Label4" runat="server" Text="Tipo Oferta:"></asp:Label>
                                                        </td>
                                                        <td style="width: 155px">
                                                            <dx:ASPxComboBox ID="cboTipoDescuento" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                                CssPostfix="Office2010Blue" Height="30px" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                                Width="150px">
                                                                <ItemStyle Height="30px" />
                                                                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                                </LoadingPanelImage>
                                                                <LoadingPanelStyle ImageSpacing="5px">
                                                                </LoadingPanelStyle>
                                                                <DropDownButton Width="20px">
                                                                </DropDownButton>
                                                                <ButtonStyle Width="13px">
                                                                </ButtonStyle>
                                                                <Paddings PaddingLeft="5px" />
                                                            </dx:ASPxComboBox>
                                                        </td>
                                                        <td style="width: 100px">
                                                            <asp:Label ID="Label5" runat="server" Text="Fecha Inicial:"></asp:Label>
                                                        </td>
                                                        <td style="width: 155px">
                                                            <dx:ASPxDateEdit ID="deFechaInicial" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                                CssPostfix="Office2010Blue" Height="30px" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                                Width="150px">
                                                                <CalendarProperties>
                                                                    <HeaderStyle Spacing="1px" />
                                                                </CalendarProperties>
                                                                <DropDownButton Width="20px">
                                                                </DropDownButton>
                                                                <ButtonStyle Width="13px">
                                                                </ButtonStyle>
                                                                <Paddings PaddingLeft="5px" />
                                                            </dx:ASPxDateEdit>
                                                        </td>
                                                        <td style="width: 84px">
                                                            <asp:Label ID="Label6" runat="server" Text="Fecha Final:"></asp:Label>
                                                        </td>
                                                        <td style="width: 155px">
                                                            <dx:ASPxDateEdit ID="deFechaFinal" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                                CssPostfix="Office2010Blue" Height="30px" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                                Width="150px">
                                                                <CalendarProperties>
                                                                    <HeaderStyle Spacing="1px" />
                                                                </CalendarProperties>
                                                                <DropDownButton Width="20px">
                                                                </DropDownButton>
                                                                <ButtonStyle Width="13px">
                                                                </ButtonStyle>
                                                                <Paddings PaddingLeft="5px" />
                                                            </dx:ASPxDateEdit>
                                                        </td>
                                                        <td>
                                                            &nbsp;
                                                        </td>
                                                    </tr>
                                                </table>
                                            </dx:PanelContent>
                                        </PanelCollection>
                                    </dx:ASPxRoundPanel>
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>
                        <dx:TabPage Text="Detalle de Materiales">
                            <TabImage Url="~/Images/modelo.png">
                            </TabImage>
                            <ContentCollection>
                                <dx:ContentControl runat="server" SupportsDisabledAttribute="True">
                                    <table width="100%">
                                        <tr>
                                            <td style="width: 105px">
                                                <dx:ASPxButton ID="btnNuevo" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Text="Nuevo" Width="100px" AutoPostBack="False">
                                                    <ClientSideEvents Click="function(s, e) {
	Nuevo();
}" />
                                                    <Image Url="~/Images/bt_new_button.gif">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                            <td style="width: 113px">
                                                <dx:ASPxButton ID="btnModificar" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Text="Modificar" Width="100px" OnClick="btnModificar_Click">
                                                    <Image Url="~/Images/edit.gif">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                            <td style="width: 105px">
                                                <dx:ASPxButton ID="btnEliminar" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Text="Eliminar" Width="100px" OnClick="btnEliminar_Click">
                                                    <ClientSideEvents Click="function(s, e) {
	e.processOnServer = confirm('¿Desea eliminar el material.?');
}" />
                                                    <Image Url="~/Images/delete.png">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                            <td>
                                                <dx:ASPxButton ID="btnImportarExcel" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Text="Importar Excel" Width="140px" AutoPostBack="False">
                                                    <ClientSideEvents Click="function(s, e) {CargaExcel();}" />
                                                    <Image Url="~/Images/excel16.gif">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>
                                    </table>
                                    <br />
                                    <dx:ASPxGridView ID="gvMateriales" runat="server" AutoGenerateColumns="False" Caption="Listado de Materiales en Oferta"
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                        KeyFieldName="ID_MATERIAL" Width="100%">
                                        <Columns>
                                            <dx:GridViewDataTextColumn Caption="Material" FieldName="DES_MATERIAL" ShowInCustomizationForm="True"
                                                VisibleIndex="1" Width="200px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Precio Unitario S/." FieldName="IMP_PRECIO_UNITARIO"
                                                ShowInCustomizationForm="True" VisibleIndex="5" Width="100px">
                                                <PropertiesTextEdit DisplayFormatString="{0:0.00}">
                                                </PropertiesTextEdit>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Modelo" FieldName="DES_MODELO" ShowInCustomizationForm="True"
                                                VisibleIndex="3" Width="100px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Grupo Artículo" FieldName="DES_GRUPO_ARTICULO"
                                                ShowInCustomizationForm="True" VisibleIndex="4" Width="120px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Código" FieldName="COD_MATERIAL" ShowInCustomizationForm="True"
                                                VisibleIndex="0" Width="100px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Sector" FieldName="DES_SECTOR" ShowInCustomizationForm="True"
                                                VisibleIndex="2" Width="100px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Cantidad Unidades Ofertadas" FieldName="CANT_UNID_OFERT"
                                                ShowInCustomizationForm="True" VisibleIndex="7" Width="100px">
                                                <PropertiesTextEdit DisplayFormatString="{0:0.0}">
                                                </PropertiesTextEdit>
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Fecha Final" FieldName="FEC_FIN" ShowInCustomizationForm="True"
                                                VisibleIndex="8" Width="120px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Precio Unitario Oferta S/." FieldName="IMP_PRECIO_UNITARIO_OFERTA"
                                                ShowInCustomizationForm="True" VisibleIndex="6">
                                                <PropertiesTextEdit DisplayFormatString="{0:0.00}">
                                                </PropertiesTextEdit>
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                        <SettingsBehavior ConfirmDelete="True" AllowDragDrop="False" AllowGroup="False" AllowSort="False"
                                            AllowSelectByRowClick="True" AllowSelectSingleRowOnly="True" AllowFocusedRow="True" />
                                        <SettingsPager Mode="ShowAllRecords">
                                        </SettingsPager>
                                        <Settings ShowGroupButtons="False" />
                                        <SettingsText ConfirmDelete="¿Seguro de quitar el material?" />
                                        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanelOnStatusBar>
                                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanel>
                                        </Images>
                                        <ImagesFilterControl>
                                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanel>
                                        </ImagesFilterControl>
                                        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                            </Header>
                                            <LoadingPanel ImageSpacing="5px">
                                            </LoadingPanel>
                                        </Styles>
                                        <StylesPager>
                                            <PageNumber ForeColor="#3E4846">
                                            </PageNumber>
                                            <Summary ForeColor="#1E395B">
                                            </Summary>
                                        </StylesPager>
                                        <StylesEditors ButtonEditCellSpacing="0">
                                            <ProgressBar Height="21px">
                                            </ProgressBar>
                                        </StylesEditors>
                                    </dx:ASPxGridView>
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>
                        <dx:TabPage Text="Usuarios">
                            <TabImage Url="~/Images/email1.PNG">
                            </TabImage>
                            <ContentCollection>
                                <dx:ContentControl runat="server" SupportsDisabledAttribute="True">
                                    <table width="100%">
                                        <tr>
                                            <td style="width: 52px">
                                                <asp:Label ID="Label11" runat="server" Text="Usuario:"></asp:Label>
                                            </td>
                                            <td style="width: 305px">
                                                <dx:ASPxComboBox ID="cboUsuario" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Width="300px" AutoResizeWithContainer="True" Height="20px">
                                                    <Columns>
                                                        <dx:ListBoxColumn Caption="Apellidos" FieldName="DES_APELLIDOS" Width="250px" />
                                                        <dx:ListBoxColumn Caption="Email" FieldName="DES_EMAIL" Width="200px" />
                                                    </Columns>
                                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                                    </LoadingPanelImage>
                                                    <LoadingPanelStyle ImageSpacing="5px">
                                                    </LoadingPanelStyle>
                                                    <ButtonStyle Width="13px">
                                                    </ButtonStyle>
                                                    <Paddings PaddingLeft="5px" />
                                                </dx:ASPxComboBox>
                                            </td>
                                            <td>
                                                <dx:ASPxButton ID="btnAgregarUsuario" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Text="Agregar" Width="100px" OnClick="btnAgregarUsuario_Click">
                                                    <Image Url="~/Images/add2.png">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>
                                    </table>
                                    <dx:ASPxGridView ID="gvUsuarios" runat="server" AutoGenerateColumns="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" Width="500px" KeyFieldName="ID_USUARIO" OnRowDeleting="gvUsuarios_RowDeleting">
                                        <Columns>
                                            <dx:GridViewCommandColumn ButtonType="Image" Caption="Quitar" ShowInCustomizationForm="True"
                                                VisibleIndex="2" Width="50px">
                                                <DeleteButton Visible="True">
                                                    <Image Url="~/Images/delete.png">
                                                    </Image>
                                                </DeleteButton>
                                            </dx:GridViewCommandColumn>
                                            <dx:GridViewDataTextColumn Caption="Usuario" ShowInCustomizationForm="True" VisibleIndex="0"
                                                Width="250px" FieldName="DES_APELLIDOS">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Email" ShowInCustomizationForm="True" VisibleIndex="1"
                                                Width="200px" FieldName="DES_EMAIL">
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                        <SettingsBehavior AllowDragDrop="False" AllowGroup="False" AllowSort="False" />
                                        <SettingsPager Mode="ShowAllRecords">
                                        </SettingsPager>
                                        <Settings ShowGroupButtons="False" />
                                        <SettingsText ConfirmDelete="¿Quitar el Usuario de la lista?" />
                                        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanelOnStatusBar>
                                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanel>
                                        </Images>
                                        <ImagesFilterControl>
                                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanel>
                                        </ImagesFilterControl>
                                        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                            </Header>
                                            <LoadingPanel ImageSpacing="5px">
                                            </LoadingPanel>
                                        </Styles>
                                        <StylesPager>
                                            <PageNumber ForeColor="#3E4846">
                                            </PageNumber>
                                            <Summary ForeColor="#1E395B">
                                            </Summary>
                                        </StylesPager>
                                        <StylesEditors ButtonEditCellSpacing="0">
                                            <ProgressBar Height="21px">
                                            </ProgressBar>
                                        </StylesEditors>
                                    </dx:ASPxGridView>
                                </dx:ContentControl>
                            </ContentCollection>
                        </dx:TabPage>
                    </TabPages>
                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
                    </LoadingPanelImage>
                    <LoadingPanelStyle ImageSpacing="5px">
                    </LoadingPanelStyle>
                    <Paddings Padding="2px" PaddingLeft="5px" PaddingRight="5px" />
                    <ContentStyle>
                        <Paddings Padding="12px" />
                        <Border BorderColor="#859EBF" BorderStyle="Solid" BorderWidth="1px" />
                    </ContentStyle>
                </dx:ASPxPageControl>
            </div>
            <dx:ASPxPopupControl ID="popupErrores" runat="server" AllowDragging="True" ClientInstanceName="popupErrores"
                CloseAction="CloseButton" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                CssPostfix="Office2010Blue" EnableViewState="False" HeaderText="Mensaje" Modal="True"
                PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                Width="300px" EnableHotTrack="False" ShowCloseButton="False">
                <HeaderImage Url="~/Images/icon_message.png">
                </HeaderImage>
                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
                </LoadingPanelImage>
                <HeaderStyle>
                    <Paddings PaddingLeft="7px" />
                </HeaderStyle>
                <LoadingPanelStyle ImageSpacing="5px">
                </LoadingPanelStyle>
                <ContentCollection>
                    <dx:PopupControlContentControl ID="PopupControlContentControl2" runat="server" SupportsDisabledAttribute="True">
                        <br />
                        <dx:ASPxPanel ID="ASPxPanel3" runat="server" DefaultButton="btCreate">
                            <PanelCollection>
                                <dx:PanelContent ID="PanelContent2" runat="server">
                                    <table width="100%">
                                        <tr>
                                            <td align="center" valign="middle">
                                                <asp:Label ID="lblMensaje" runat="server"></asp:Label>
                                                <br />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center">
                                                <dx:ASPxButton ID="ASPxButton6" runat="server" AutoPostBack="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Text="Aceptar" Width="10px">
                                                    <ClientSideEvents Click="function(s, e) {
	popupErrores.Hide();
}" />
                                                    <Image Url="~/Images/ok.png">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>
                                    </table>
                                </dx:PanelContent>
                            </PanelCollection>
                        </dx:ASPxPanel>
                    </dx:PopupControlContentControl>
                </ContentCollection>
            </dx:ASPxPopupControl>
            <dx:ASPxPopupControl ID="popupNuevo" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                CssPostfix="Office2010Blue" EnableHotTrack="False" HeaderText="Nuevo Material"
                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Width="450px"
                AllowDragging="True" ClientIDMode="Static" ClientInstanceName="popupNuevo" CloseAction="CloseButton"
                Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter"
                ShowCloseButton="False">
                <HeaderImage Url="~/Images/add2.png">
                </HeaderImage>
                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
                </LoadingPanelImage>
                <HeaderStyle>
                    <Paddings PaddingLeft="7px" />
                </HeaderStyle>
                <LoadingPanelStyle ImageSpacing="5px">
                </LoadingPanelStyle>
                <ContentCollection>
                    <dx:PopupControlContentControl runat="server" SupportsDisabledAttribute="True">
                        <table cellpadding="3" cellspacing="3" width="100%" border="0">
                            <tr>
                                <td colspan="3">
                                    <table cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td style="width: 54px">
                                                Material:
                                            </td>
                                            <td style="width: 165px">
                                                <asp:TextBox ID="txtCodMaterial" runat="server" AutoPostBack="True" Height="21px"
                                                    OnTextChanged="txtCodMaterial_TextChanged" Width="150px"></asp:TextBox>
                                            </td>
                                            <td>
                                                <dx:ASPxButton ID="btnCMBuscarMaterial" runat="server" AutoPostBack="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" HorizontalAlign="Center" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Width="50px">
                                                    <ClientSideEvents Click="function(s, e) {pcMaterial.Show();}" />
                                                    <Image Url="~/Images/three_dots.png">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <hr />
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 132px">
                                    Descripción:
                                </td>
                                <td colspan="2">
                                    <asp:Label ID="lblDesMaterial" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 132px; height: 22px;">
                                    Modelo:
                                </td>
                                <td colspan="2">
                                    <asp:Label ID="lblModelo" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 132px">
                                    Grupo:
                                </td>
                                <td colspan="2">
                                    <asp:Label ID="lblGrupoArticulo" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 132px; height: 22px;">
                                    Sector:
                                </td>
                                <td colspan="2" style="height: 22px">
                                    <asp:Label ID="lblSector" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 132px">
                                    Stock Actual:
                                </td>
                                <td colspan="2">
                                    <asp:Label ID="lblStock" runat="server"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 132px">
                                    <asp:Label ID="Label12" runat="server" Text="Precio Unitario:"></asp:Label>
                                </td>
                                <td colspan="2">
                                    <table cellpadding="0" cellspacing="0" width="110">
                                        <tr>
                                            <td style="width: 105px">
                                                <dx:ASPxSpinEdit ID="sePrecioUnitario" runat="server" AllowMouseWheel="False" AllowNull="False"
                                                    ClientIDMode="Static" ClientInstanceName="seCantidadOfertad" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" DecimalPlaces="2" Number="0" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Width="100px">
                                                    <SpinButtons HorizontalSpacing="0">
                                                    </SpinButtons>
                                                    <ButtonStyle Width="20px">
                                                    </ButtonStyle>
                                                    <Paddings PaddingLeft="5px" />
                                                </dx:ASPxSpinEdit>
                                            </td>
                                            <td>
                                                <dx:ASPxLabel ID="ASPXLabel9" runat="server" CssClass="campos_oblig" ForeColor="#CC0000"
                                                    Text="*">
                                                </dx:ASPxLabel>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 132px">
                                    <asp:Label ID="Label10" runat="server" Text="Precio Unitario Oferta:"></asp:Label>
                                </td>
                                <td>
                                    <table width="110" cellpadding="0" cellspacing="0">
                                        <tr>
                                            <td style="width: 105px">
                                                <dx:ASPxSpinEdit ID="sePrecioUnitarioOferta" runat="server" AllowMouseWheel="False"
                                                    AllowNull="False" ClientIDMode="Static" ClientInstanceName="sePrecioUnitario"
                                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                                    DecimalPlaces="2" Number="0" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Width="100px">
                                                    <SpinButtons HorizontalSpacing="0">
                                                    </SpinButtons>
                                                    <ButtonStyle Width="20px">
                                                    </ButtonStyle>
                                                    <Paddings PaddingLeft="5px" />
                                                </dx:ASPxSpinEdit>
                                            </td>
                                            <td>
                                                <dx:ASPxLabel ID="ASPXLabel8" runat="server" CssClass="campos_oblig" ForeColor="#CC0000"
                                                    Text="*">
                                                </dx:ASPxLabel>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td>
                                    <asp:Label ID="lblCodigoMaterial" runat="server" Visible="False"></asp:Label>
                                    <asp:Label ID="lblIdMaterial" runat="server" Visible="False"></asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 132px">
                                    Unidades Ofertadas:
                                </td>
                                <td>
                                    <table cellpadding="0" cellspacing="0" width="110">
                                        <tr>
                                            <td style="width: 105px">
                                                <dx:ASPxSpinEdit ID="seCantidadOfertada" runat="server" AllowMouseWheel="False" AllowNull="False"
                                                    ClientIDMode="Static" ClientInstanceName="seCantidadOfertad" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" DecimalPlaces="2" Number="0" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Width="100px">
                                                    <SpinButtons HorizontalSpacing="0">
                                                    </SpinButtons>
                                                    <ButtonStyle Width="20px">
                                                    </ButtonStyle>
                                                    <Paddings PaddingLeft="5px" />
                                                </dx:ASPxSpinEdit>
                                            </td>
                                            <td>
                                                <dx:ASPxLabel ID="ASPXLabel7" runat="server" CssClass="campos_oblig" ForeColor="#CC0000"
                                                    Text="*">
                                                </dx:ASPxLabel>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                                <td>
                                    <div style="display: none">
                                        <asp:TextBox ID="txtFila" runat="server" Width="5px"></asp:TextBox>
                                        <asp:TextBox ID="txtTipo" runat="server" Width="5px"></asp:TextBox>
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td colspan="3">
                                    <table width="100%">
                                        <tr>
                                            <td colspan="2">
                                                <hr />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td class="filas2"  width="105">
                                                <dx:ASPxButton ID="btnCMGuardar" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" OnClick="GuardarCM" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Style="height: 23px" Text="Guardar" Width="100px">
                                                    <Image Url="~/Images/save_16.gif">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                            <td class="filas2" >
                                                <dx:ASPxButton ID="btnCancelar" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Text="Salir" Width="100px">
                                                    <ClientSideEvents Click="function(s, e) {
Salir();
}" />
                                                    <Image Url="~/Images/logout.png">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </dx:PopupControlContentControl>
                </ContentCollection>
            </dx:ASPxPopupControl>
            <dx:ASPxPopupControl ID="pcMaterial" runat="server" ClientInstanceName="pcMaterial"
                HeaderText="Buscar Material" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter"
                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                EnableHotTrack="False" AllowDragging="True" CloseAction="CloseButton" ShowCloseButton="False">
                <HeaderImage Url="~/Images/search.png">
                </HeaderImage>
                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
                </LoadingPanelImage>
                <HeaderStyle>
                    <Paddings PaddingLeft="7px" />
                </HeaderStyle>
                <LoadingPanelStyle ImageSpacing="5px">
                </LoadingPanelStyle>
                <ContentCollection>
                    <dx:PopupControlContentControl>
                        <table width="100%">
                            <tr>
                                <td style="width: 44px">
                                    Sector:
                                </td>
                                <td style="width: 175px">
                                    <dx:ASPxComboBox ID="cboSector" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" Height="21px" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Width="170px" TabIndex="1">
                                        <ItemStyle Height="30px" />
                                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                        </LoadingPanelImage>
                                        <LoadingPanelStyle ImageSpacing="5px">
                                        </LoadingPanelStyle>
                                        <DropDownButton Width="20px">
                                        </DropDownButton>
                                        <ButtonStyle Width="13px">
                                        </ButtonStyle>
                                        <Paddings PaddingLeft="5px" />
                                    </dx:ASPxComboBox>
                                </td>
                                <td style="width: 67px">
                                    Límite:
                                </td>
                                <td style="width: 175px">
                                    <dx:ASPxComboBox ID="cboMatLimite" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" Height="21px" SelectedIndex="0" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Width="170px" TabIndex="2">
                                        <Items>
                                            <dx:ListEditItem Selected="True" Text="100 Registros" Value="100" />
                                            <dx:ListEditItem Text="200  Registros" Value="200" />
                                        </Items>
                                        <ItemStyle Height="30px" />
                                        <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                        </LoadingPanelImage>
                                        <LoadingPanelStyle ImageSpacing="5px">
                                        </LoadingPanelStyle>
                                        <DropDownButton Width="20px">
                                        </DropDownButton>
                                        <ButtonStyle Width="13px">
                                        </ButtonStyle>
                                        <Paddings PaddingLeft="5px" />
                                    </dx:ASPxComboBox>
                                </td>
                                <td class="filas2"  rowspan="2">
                                    <dx:ASPxButton ID="btnMBuscar" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" OnClick="btnMBuscar_Click" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Text="Buscar" Width="100px" TabIndex="5">
                                        <Image Url="~/Images/search.png">
                                        </Image>
                                    </dx:ASPxButton>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 44px">
                                    Código:
                                </td>
                                <td style="width: 175px">
                                    <dx:ASPxTextBox ID="txtMCodigo" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" Height="21px" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Width="170px" TabIndex="3">
                                        <Paddings PaddingLeft="5px" />
                                    </dx:ASPxTextBox>
                                </td>
                                <td style="width: 67px">
                                    Descripción:
                                </td>
                                <td style="width: 175px">
                                    <dx:ASPxTextBox ID="txtMDescrip" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" Height="21px" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Width="170px" TabIndex="4">
                                        <Paddings PaddingLeft="5px" />
                                    </dx:ASPxTextBox>
                                </td>
                            </tr>
                        </table>
                        <table width="100%">
                            <tr>
                                <td>
                                    <dx:ASPxGridView ID="grdMaterial" runat="server" AutoGenerateColumns="False" ClientInstanceName="grdMaterial"
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                        KeyFieldName="ID_MATERIAL" Width="100%">
                                        <TotalSummary>
                                            <dx:ASPxSummaryItem DisplayFormat="total de filas = #,##0" FieldName="DES_SECTOR"
                                                SummaryType="Count" />
                                        </TotalSummary>
                                        <Columns>
                                            <dx:GridViewDataTextColumn FieldName="ID_MATERIAL" ShowInCustomizationForm="True"
                                                Visible="False" VisibleIndex="0" Width="0px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Código" FieldName="COD_MATERIAL" ShowInCustomizationForm="True"
                                                VisibleIndex="2" Width="90px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Descripción" FieldName="DES_MATERIAL" ShowInCustomizationForm="True"
                                                VisibleIndex="3" Width="350px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="FOB" ShowInCustomizationForm="True" Visible="False"
                                                VisibleIndex="6" Width="0px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Sector" FieldName="DES_SECTOR" ShowInCustomizationForm="True"
                                                VisibleIndex="1" Width="90px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn FieldName="ID_SECTOR" ShowInCustomizationForm="True" Visible="False"
                                                VisibleIndex="7" Width="0px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Modelo" FieldName="DES_MODELO" ShowInCustomizationForm="True"
                                                VisibleIndex="4" Width="150px">
                                            </dx:GridViewDataTextColumn>
                                            <dx:GridViewDataTextColumn Caption="Grupo Artículo" FieldName="DES_GRUPO_ARTICULO"
                                                ShowInCustomizationForm="True" VisibleIndex="5" Width="150px">
                                            </dx:GridViewDataTextColumn>
                                        </Columns>
                                        <SettingsBehavior AllowFocusedRow="True" AllowDragDrop="False" AllowGroup="False"
                                            AllowSort="False" />
                                        <SettingsPager PageSize="500" Visible="False">
                                        </SettingsPager>
                                        <Settings ShowFooter="True" ShowVerticalScrollBar="True" />
                                        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanelOnStatusBar>
                                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanel>
                                        </Images>
                                        <ImagesFilterControl>
                                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                                            </LoadingPanel>
                                        </ImagesFilterControl>
                                        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                                            </Header>
                                            <LoadingPanel ImageSpacing="5px">
                                            </LoadingPanel>
                                        </Styles>
                                        <StylesPager>
                                            <PageNumber ForeColor="#3E4846">
                                            </PageNumber>
                                            <Summary ForeColor="#1E395B">
                                            </Summary>
                                        </StylesPager>
                                        <StylesEditors ButtonEditCellSpacing="0">
                                        </StylesEditors>
                                    </dx:ASPxGridView>
                                </td>
                            </tr>
                            <tr>
                                <td align="left">
                                    <table cellpadding="0" cellspacing="0" width="100%">
                                        <tr>
                                            <td class="filas2"  width="105">
                                                <dx:ASPxButton ID="btnAgregarMaterial" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" OnClick="AgregarMaterial" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Text="Aceptar" Width="100px">
                                                    <Image Url="~/Images/ok.png">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                            <td class="filas2" >
                                                <dx:ASPxButton ID="btnCancelarMaterial" runat="server" AutoPostBack="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                                    Text="Salir" Width="100px">
                                                    <ClientSideEvents Click="function(s, e){ pcMaterial.Hide();}" />
                                                    <Image Url="~/Images/logout.png">
                                                    </Image>
                                                </dx:ASPxButton>
                                            </td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </table>
                    </dx:PopupControlContentControl>
                </ContentCollection>
            </dx:ASPxPopupControl>
            <dx:ASPxPopupControl ID="pcImpExcel" runat="server" ClientInstanceName="pcImpExcel"
                Width="500px" HeaderText="Importación de Archivo Excel" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter"
                CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                EnableHotTrack="False" CloseAction="CloseButton" ShowCloseButton="False" AllowDragging="True">
                <HeaderImage Url="~/Images/excel16.gif">
                </HeaderImage>
                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Web/Loading.gif">
                </LoadingPanelImage>
                <HeaderStyle>
                    <Paddings PaddingLeft="7px" />
                </HeaderStyle>
                <LoadingPanelStyle ImageSpacing="5px">
                </LoadingPanelStyle>
                <ContentCollection>
                    <dx:PopupControlContentControl>
                        <table width="100%" align="center">
                            <tr>
                                <td style="width: 118px">
                                    Seleccionar Archivo
                                </td>
                                <td align="char" colspan="2">
                                    <dx:ASPxUploadControl ID="ucCargarExcel" runat="server" OnClientClick="RegistrarTriggers(this)"
                                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                        OnFileUploadComplete="ucCargarExcel_FileUploadComplete" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Width="100%" AddUploadButtonsHorizontalPosition="Center" ClientInstanceName="ucCargarExcel">
                                        <ValidationSettings AllowedFileExtensions=".xls, .xlsx" MultiSelectionErrorText="Attention! 

                                                                    The following {0} files are invalid because they exceed the allowed file size ({1}) or their extensions are not allowed. These files have been removed from selection, so they will not be uploaded. 

                                                                    {2}" NotAllowedFileExtensionErrorText="Solo Puede Subir archivos excel(.xls;.xlsx)">
                                        </ValidationSettings>
                                        <BrowseButton Text="Examinar...">
                                        </BrowseButton>
                                        <BrowseButtonStyle Font-Size="10pt">
                                        </BrowseButtonStyle>
                                    </dx:ASPxUploadControl>
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 118px">
                                    &nbsp;
                                </td>
                                <td class="filas2"  align="right">
                                    <dx:ASPxButton ID="cmdImportar" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Text="Importar Archivo" Width="160px" ClientInstanceName="cmdImportar" OnClick="cmdImportar_Click">
                                        <ClientSideEvents Click="function(s, e) {pcImpExcel.Hide(); ucCargarExcel.Upload();/*e.processOnServer = true;*/}" />
                                        <Image Url="~/Images/excel16.gif">
                                        </Image>
                                    </dx:ASPxButton>
                                </td>
                                <td class="filas2"  align="right" width="105">
                                    <dx:ASPxButton ID="btnCancelarImpExcel" runat="server" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                        CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                        Text="Salir" Width="100px" ClientInstanceName="btnCancelarImpExcel" AutoPostBack="False">
                                        <ClientSideEvents Click="function(s, e) {pcImpExcel.Hide();}" />
                                        <Image Url="~/Images/logout.png">
                                        </Image>
                                    </dx:ASPxButton>
                                </td>
                            </tr>
                        </table>
                    </dx:PopupControlContentControl>
                </ContentCollection>
            </dx:ASPxPopupControl>
        </ContentTemplate>
    </asp:UpdatePanel>
    <table>
        <tr>
            <td class="filas2" >
                <dx:ASPxButton ID="btnVerDetalle" runat="server" OnClick="btnDetalle_Click" ClientVisible="false"
                    ClientInstanceName="btnVerDetalle" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                    CssPostfix="Office2010Blue" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                    Width="1px">
                </dx:ASPxButton>
            </td>
        </tr>
    </table>
</asp:Content>
